<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <input type="text" class="user">
    <br>
    <input type="text" class="pwd">
    <br>
    <button>注册</button>


    <script src="../js/tools.js"></script>
    <script src="../js/ajax.js"></script>
    <script src="../js/cookie.js"></script>
    <script>

        const oUser = get('.user');
        const oPwd = get('.pwd');
        const oBtn = get('button');


        oBtn.onclick = function () {
            const username = oUser.value;
            const password = oPwd.value;

            ajax({
                path: `../php/07reg.php?username=${username}&password=${password}`,
                success: data => {
                    console.log(data);
                }
            })
        }




    </script>

</body>

</html>